#ifndef __SERVERACCEPTOR_H__
#define __SERVERACCEPTOR_H__

#include "../Common/Acceptor.h"
#include "../Common/Packet.hpp"

class CServerAcceptor : public CAcceptor
{
public:
			CServerAcceptor( boost::asio::io_service& io_service, unsigned short port );
	virtual ~CServerAcceptor( void );

private:
	virtual void OnAcceptFailed( const boost::system::error_code& e, ConnectionPtr conn );
	virtual void OnReadFailed( const boost::system::error_code& e, size_t bytes_transferred, ConnectionPtr conn );
	virtual void OnWriteFailed( const boost::system::error_code& e, ConnectionPtr conn );
	virtual void OnAcceptSuccessed( ConnectionPtr conn );
	virtual void OnReadSuccessed( size_t bytes_transferred, ConnectionPtr conn );
	virtual void OnWriteSuccessed( ConnectionPtr conn );

private:
	std::vector< SCommonPacket * > m_RecvPacket;
};

#endif	// __SERVERACCEPTOR_H__